<template>
<div>    
    <table border style="width: 100%;">
        <span style="margin-left: 50%;">配种情况</span>
        <tr>
            <td>
                <el-table :data="info" border style="width: 100;" >
            <el-table-column prop="breedingDate" label="配种日期" align="center" >
            <template v-slot="scope">
                <span style="margin-left: 20px;" v-if="scope.row.breedingDate==null">{{scope.row.breedingDate}}</span>
                <span style="margin-left: 20px;" v-else="scope.row.breedingDate">{{scope.row.breedingDate.substr(0,10).replace("T"," ")}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="serviceRam" label="种公耳号" align="center" />
        <el-table-column prop="" label="种公品种" align="center" />
        <el-table-column prop="speciesEstrusType" label="种母发情类型" align="center" />
    </el-table>
            </td>
            <td>
    <el-table :data="info" border style="width: 100%;">
        <el-table-column prop="" label="妊检日期" align="center" >
            <template v-slot="scope">
                <!-- <span style="margin-left: 20px;" v-if="scope.row.breedingDate==null">{{scope.row.breedingDate}}</span>
                <span style="margin-left: 20px;" v-else="scope.row.breedingDate">{{scope.row.breedingDate.substr(0,10).replace("T"," ")}}</span> -->
            </template>
        </el-table-column>
        <el-table-column prop="" label="妊检结果" align="center" >
            <template v-slot="scope">
                <!-- <span style="margin-left: 20px;" v-if="scope.row.breedingDate==null">{{scope.row.breedingDate}}</span>
                <span style="margin-left: 20px;" v-else="scope.row.breedingDate">{{scope.row.breedingDate.substr(0,10).replace("T"," ")}}</span> -->
            </template>
        </el-table-column>
    </el-table>
            </td>
        </tr>
    </table>
</div>
</template>
<script setup lang="ts">
import http from "http";
import {reactive,ref,onMounted} from "vue"
import Cookies from 'cookies-ts'
import axios from "axios";
const cookie = new Cookies();
const info=ref()
const infoList=()=>{
    axios.get("http://10.31.60.16:8082/api/Breedings/GetBreedingForEar?EarNumber="+cookie.get("earNumber")).then(res=>{
        info.value=res.data;
    })
}
const pick=ref()

onMounted(()=>{
infoList()
})
</script>
<style></style>